package edu.scau.pos.mapper;

import edu.scau.pos.domain.Category;
import edu.scau.pos.vo.CategoryVo;
import edu.scau.tool.annotation.RequestLog;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    //查找所有
    List<CategoryVo> listAll();
    //根据id查找一条数据
    CategoryVo findCategoryById(Long id);
    //分页查找
    List<CategoryVo> listByPage(CategoryVo category);
    //更新by id
    //
    @RequestLog
    int updateCategory(Category category);
    @RequestLog
    //删除
    int deleteCategoryById(Long id);
    @RequestLog
    //增加
    int insertCategory(Category category);

    int isExisted(long categoryId);
}
